package com.hliushi.state.example01_right;

/**
 * 状态接口
 *
 * @author: hliushi
 * @date: 2023/2/15 22:47
 **/
public interface State {

    /**
     * 切换为红灯
     */
    void switchToRed(TrafficLight trafficLight);

    /**
     * 切换为绿灯
     */
    void switchToGreen(TrafficLight trafficLight);

    /**
     * 切换为黄灯
     */
    void switchToYellow(TrafficLight trafficLight);

    default String currentState() {
        return "";
    }
}
